import request from '@/utils/request'

export const saveProject = (form) => 
    request({
        url: '/op/project/create_project',
        method: 'post',
        data:JSON.stringify(form)       
    })
export  const  listProject = (url,search) =>
	request({
		url,
        method: 'get',
        params: {
            pageSize: search.limit,
            keyWord: search.name,
            pageNo:search.currentPage,
            type:search.item_type,
            status:search.item_state
        }   
	})

export  const  detailProject  =  (code) =>
    request({
        url: '/op/project/get_project',
        method: 'get',
        params: {
            code
        }   
    })

export  const  removeProject = (code) =>
    request({
        
        url: '/op/project/delete_project',
        method: 'get',
        params: {
            code
        }  
    })
/*标记删除*/
export  const  removeProject_badge = (code) =>
    request({
        url: '/op/project/mark_delete_project',
        method: 'get',
        params: {
            code
        }  
    })
export  const  removeCancel_badge = (code) =>
    request({
        url: '/op/project/mark_delete_project_cancel',
        method: 'get',
        params: {
            code
        }  
    })  


export const modifyProject = (form) => 
    request({
        url: '/op/project/modify_project',
        method: 'post',
        data:JSON.stringify(form)

    })
